Skip to main content

Pooling Manager

l2PoolingManager

uint256 l2PoolingManager

strategyInfo

mapping(address => struct StrategyInfo) strategyInfo

batchCounter

uint256 batchCounter

ethBridge

address ethBridge

ethWrapped

address ethWrapped

pendingRequests

struct StrategyReportL2[] pendingRequests

pendingRequestsExecuted

struct StrategyReportL1[] pendingRequestsExecuted

pendingRequestsExecutedCounter

uint256 pendingRequestsExecutedCounter

PendingRequestsExecuted

event PendingRequestsExecuted(uint256[] indices)

MessageResentToL2

event MessageResentToL2()

BridgeCancelDepositRequestClaimedAndDeposited

event BridgeCancelDepositRequestClaimedAndDeposited(address l1BridgeAddress, uint256 amount, uint256 nonce)

CancelDepositRequestBridgeSent

event CancelDepositRequestBridgeSent(address l1BridgeAddress, uint256 amount, uint256 nonce)

ReportHandled

event ReportHandled(uint256 epoch, uint256 strategyReportL1Length, struct StrategyReportL1[] strategyReportL1)

StrategyRegistered

event StrategyRegistered(address strategy, struct StrategyInfo strategyInfo)

L2_HANDLER_SELECTOR

uint256 L2_HANDLER_SELECTOR

RELAYER_ROLE

bytes32 RELAYER_ROLE

receive

receive() external payable

Receive Ether function

fallback

fallback() external payable

Fallback function

constructor

constructor() public

initialize

function initialize(address _owner, uint256 _l2PoolingManager, address _starknetCore, address _relayer, address _ethBridge, address _ethWrapped) public

Initialier the contract state.

Parameters

NameTypeDescription
_owneraddress
_l2PoolingManageruint256troveManager address
_starknetCoreaddressstarknetCore address
_relayeraddressrelayer address
_ethBridgeaddress
_ethWrappedaddress

hashFromReportL2

function hashFromReportL2(uint256 epoch, struct BridgeInteractionInfo[] bridgeWithdrawInfo, struct StrategyReportL2[] strategyReportL2, struct BridgeInteractionInfo[] bridgeDepositInfo) public pure returns (uint256)

hashFromReportL1

function hashFromReportL1(uint256 strategyReportL1Length, struct StrategyReportL1[] strategyReportL1) public pure returns (uint256)

bridgeEthFeesMultiplicator

function bridgeEthFeesMultiplicator(struct BridgeInteractionInfo[] bridgeDepositInfo) public view returns (uint256)

registerStrategy

function registerStrategy(address _strategy, address _underlying, address _bridge) public payable

setPoolingManager

function setPoolingManager(uint256 _l2PoolingManager) public payable

cancelDepositRequestBridge

function cancelDepositRequestBridge(address l1BridgeAddress, uint256 amount, uint256 nonce) public

claimBridgeCancelDepositRequestAndDeposit

function claimBridgeCancelDepositRequestAndDeposit(address l1BridgeAddress, uint256 amount, uint256 nonce, uint256 l2BridgeEthFee) public payable

pause

function pause() external

unpause

function unpause() external

executePendingRequests

function executePendingRequests() public

handleReport

function handleReport(uint256 epoch, struct BridgeInteractionInfo[] bridgeWithdrawInfo, struct StrategyReportL2[] strategyReportL2, struct BridgeInteractionInfo[] bridgeDepositInfo, uint256 l2BridgeEthFee, uint256 l2MessagingEthFee, uint256 minSuccessCall) public payable

getMessagePayloadData

function getMessagePayloadData(uint256 epoch, uint256 strategyReportL1Hash) internal pure returns (uint256[])

deleteElement

function deleteElement(struct StrategyReportL2[] array, uint256 index) internal

verifyCallData

function verifyCallData(uint256 epoch, struct BridgeInteractionInfo[] bridgeWithdrawInfo, struct StrategyReportL2[] strategyReportL2, struct BridgeInteractionInfo[] bridgeDepositInfo) internal

withdrawFromBridges

function withdrawFromBridges(struct BridgeInteractionInfo[] bridgeWithdrawalInfo) internal

depositToBridges

function depositToBridges(struct BridgeInteractionInfo[] bridgeDepositInfo, uint256 l2BridgeEthFee, bool withdrawEth) internal

handleMassReport

function handleMassReport(struct StrategyReportL2[] strategyReportL2, struct BridgeInteractionInfo[] bridgeDepositInfo) internal returns (uint256, struct StrategyReportL1[], struct BridgeInteractionInfo[])

processStrategyReports

function processStrategyReports(struct StrategyReportL2[] strategyReportL2) internal returns (uint256 strategyReportL1Length, struct StrategyReportL1[] strategyReportL1, uint256 tempBridgeLossLength, struct BridgeInteractionInfo[] tempBridgeLoss)

processPendingRequests

function processPendingRequests(uint256 strategyReportL1Length, struct StrategyReportL1[] strategyReportL1, struct BridgeInteractionInfo[] bridgeDepositInfo, uint256 pendingRequestsExecutedLength) internal returns (uint256, struct StrategyReportL1[], struct BridgeInteractionInfo[])

mergeReportsAndUpdateDeposits

function mergeReportsAndUpdateDeposits(uint256 strategyReportL1Length, struct StrategyReportL1[] strategyReportL1, struct BridgeInteractionInfo[] bridgeDepositInfo, uint256 pendingRequestsExecutedLength) internal view returns (uint256 newStrategyReportL1Length, struct StrategyReportL1[] newStrategyReportL1, uint256 tempBridgeAdditionalDepositLength, struct BridgeInteractionInfo[] tempBridgeAdditionalDeposit)

processPendingRequest

function processPendingRequest(uint256 i, uint256 strategyReportL1Length, struct StrategyReportL1[] newStrategyReportL1, struct BridgeInteractionInfo[] bridgeDepositInfo, struct BridgeInteractionInfo[] tempBridgeAdditionalDeposit, uint256 tempBridgeAdditionalDepositLength) internal view returns (uint256)